-- GENERATED SPELL FOR [Phantasmal Naga] --


function spell0_27648(pUnit, Event) --@Hooked Net,n/a--
pUnit:FullCastSpellOnTarget(49711,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27648', 4500, 1)
end

function spell1_27648(pUnit, Event) --@Hooked Net,n/a--
pUnit:FullCastSpellOnTarget(59260,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27648', 4500, 1)
end

function spell2_27648(pUnit, Event) --@Water Tomb,n/a--
pUnit:FullCastSpellOnTarget(50732,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27648', 6000, 1)
end

function spell3_27648(pUnit, Event) --@Water Tomb,n/a--
pUnit:FullCastSpellOnTarget(59261,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27648', 6000, 1)
end

function Sorts_27648(pUnit, Event)
local choix_sorts_27648 = math.random(0, 3)
if choix_sorts_27648 == 0 then
pUnit:RegisterEvent('spell0_27648', 1, 1)
end
if choix_sorts_27648 == 1 then
pUnit:RegisterEvent('spell1_27648', 1, 1)
end
if choix_sorts_27648 == 2 then
pUnit:RegisterEvent('spell2_27648', 1, 1)
end
if choix_sorts_27648 == 3 then
pUnit:RegisterEvent('spell3_27648', 1, 1)
end
end

function mob27648_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27648', math.random(1500, 3000), 1)
end

function mob27648_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27648_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27648_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27648, 1, 'mob27648_Action')
RegisterUnitEvent(27648, 2, 'mob27648_Leave')
RegisterUnitEvent(27648, 3, 'mob27648_Kill')
RegisterUnitEvent(27648, 4, 'mob27648_Die')
